package com.macro.mall.common.exception;

import com.macro.mall.common.api.IErrorCode;

/**
 * @author：郎
 * @name：AccessLimitException
 * @date：2024/3/18 12:24
 */
public class AccessLimitException extends Exception {
    private IErrorCode errorCode;

    public AccessLimitException(IErrorCode errorCode) {
        super(errorCode.getMessage());
        this.errorCode = errorCode;
    }

    public AccessLimitException(String message) {
        super(message);
    }

    public AccessLimitException(Throwable cause) {
        super(cause);
    }

    public AccessLimitException(String message, Throwable cause) {
        super(message, cause);
    }

    public IErrorCode getErrorCode() {
        return errorCode;
    }
}
